Solid-state drives (SSDs) generally have faster performance, are more compact, and are less sensitive to vibration or physical shock than conventional magnetic disk drives. Given these advantages, SSDs are being used in more and more computing devices and other consumer products in lieu of or in addition to magnetic disk drives, even though the cost-per-gigabyte storage capacity of SSDs is significantly higher than that of magnetic disk drives.
The performance of SSDs is not attributable only to the speed of reading from and writing to memory cells of SSDs, but also the time taken by the SSD controller to process the read and write commands issued by connected host systems. From the perspective of the host system, IO (input-output operation) latency is measured by the time it issues the read or write command to the SSD to the time the SSD responds with read data or a write acknowledgement. If there any delays between those two time periods, including delays attributable to the SSD controller, the host system will experience an increase in latency.
SSD controllers transfer read data and write data to and from the host system using direct memory access (DMA) transfers. DMA is a technique for transferring blocks of data between system memory and peripherals without involving the system processor in each transfer. To avoid setting aside large blocks of memory in the host system, an SSD controller can use a scatter-gather list (SGL) based DMA to transfer read and write data. SGL-based DMA provides data transfers to and from non-contiguous blocks of system memory using a series of contiguous-block transfers. To effectuate DMA transfers, the host system generates DMA descriptors that hold the necessary control information. In SGL based DMA, the number of descriptors needed for a given command to the SSD is unknown. Accordingly, the SSD controller must adequately manage fetching and storing of DMA descriptors to conserve resources, while achieving desired performance and command latency.